// Copyright 2018-2021 Polyaxon, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

/* tslint:disable */
/* eslint-disable */
/**
 * Polyaxon SDKs and REST API specification.
 * Polyaxon SDKs and REST API specification.
 *
 * The version of the OpenAPI document: 1.7.4
 * Contact: contact@polyaxon.com
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */

import { exists, mapValues } from '../runtime';
import {
    V1RunReferenceCatalog,
    V1RunReferenceCatalogFromJSON,
    V1RunReferenceCatalogFromJSONTyped,
    V1RunReferenceCatalogToJSON,
    V1RunSettingsCatalog,
    V1RunSettingsCatalogFromJSON,
    V1RunSettingsCatalogFromJSONTyped,
    V1RunSettingsCatalogToJSON,
} from './';

/**
 * 
 * @export
 * @interface V1RunSettings
 */
export interface V1RunSettings {
    /**
     * 
     * @type {string}
     * @memberof V1RunSettings
     */
    namespace?: string;
    /**
     * 
     * @type {V1RunSettingsCatalog}
     * @memberof V1RunSettings
     */
    agent?: V1RunSettingsCatalog;
    /**
     * 
     * @type {V1RunSettingsCatalog}
     * @memberof V1RunSettings
     */
    queue?: V1RunSettingsCatalog;
    /**
     * 
     * @type {V1RunSettingsCatalog}
     * @memberof V1RunSettings
     */
    artifacts_store?: V1RunSettingsCatalog;
    /**
     * 
     * @type {V1RunReferenceCatalog}
     * @memberof V1RunSettings
     */
    hub?: V1RunReferenceCatalog;
    /**
     * 
     * @type {V1RunReferenceCatalog}
     * @memberof V1RunSettings
     */
    registry?: V1RunReferenceCatalog;
}

export function V1RunSettingsFromJSON(json: any): V1RunSettings {
    return V1RunSettingsFromJSONTyped(json, false);
}

export function V1RunSettingsFromJSONTyped(json: any, ignoreDiscriminator: boolean): V1RunSettings {
    if ((json === undefined) || (json === null)) {
        return json;
    }
    return {
        
        'namespace': !exists(json, 'namespace') ? undefined : json['namespace'],
        'agent': !exists(json, 'agent') ? undefined : V1RunSettingsCatalogFromJSON(json['agent']),
        'queue': !exists(json, 'queue') ? undefined : V1RunSettingsCatalogFromJSON(json['queue']),
        'artifacts_store': !exists(json, 'artifacts_store') ? undefined : V1RunSettingsCatalogFromJSON(json['artifacts_store']),
        'hub': !exists(json, 'hub') ? undefined : V1RunReferenceCatalogFromJSON(json['hub']),
        'registry': !exists(json, 'registry') ? undefined : V1RunReferenceCatalogFromJSON(json['registry']),
    };
}

export function V1RunSettingsToJSON(value?: V1RunSettings | null): any {
    if (value === undefined) {
        return undefined;
    }
    if (value === null) {
        return null;
    }
    return {
        
        'namespace': value.namespace,
        'agent': V1RunSettingsCatalogToJSON(value.agent),
        'queue': V1RunSettingsCatalogToJSON(value.queue),
        'artifacts_store': V1RunSettingsCatalogToJSON(value.artifacts_store),
        'hub': V1RunReferenceCatalogToJSON(value.hub),
        'registry': V1RunReferenceCatalogToJSON(value.registry),
    };
}


